package com.dyzx.hbb.modules.mtn.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.dyzx.hbb.common.config.MyLambdaQueryWrapper;
import com.dyzx.hbb.modules.mtn.entity.MtnCarVehicle;
import com.dyzx.hbb.modules.mtn.service.MtnCarVehicleService;
import com.dyzx.hbb.modules.mtn.mapper.MtnCarVehicleMapper;
import org.springframework.stereotype.Service;

/**
* @author Administrator
* @description 针对表【mtn_car_vehicle(车辆信息表)】的数据库操作Service实现
* @createDate 2025-08-08 20:09:08
*/
@Service
public class MtnCarVehicleServiceImpl extends ServiceImpl<MtnCarVehicleMapper, MtnCarVehicle>
    implements MtnCarVehicleService{

    @Override
    public MtnCarVehicle getByVin(String vin) {
        MyLambdaQueryWrapper<MtnCarVehicle> queryWrapper = new MyLambdaQueryWrapper<>();
        queryWrapper.eq(MtnCarVehicle::getVin,vin);
        queryWrapper.last("limit 1");
        return this.getOne(queryWrapper);

    }
}




